Based on the developing of ims narcotics detector , this article analyzes the kernel of real time operating system , introduces how to using real time multi - task operating system as object - develop environment , puts forward the analyzing and designing methodologies used in ims narcotics detector embedded software designing which is based on rtos , conceives a data - flow structure model for embedded software design , and provides an effective resolvent for middle or little real time system . it also deals with the arithmetic for peak - location ( mobile - time ) finding and temperature control , and at last summarizes the points for attention when applying rtos 本文主要以離子遷移譜毒品偵查儀的研制為工程背景,重點(diǎn)是剖析實(shí)時(shí)多任務(wù)操作系統(tǒng)內(nèi)核,介紹如何以已有的實(shí)時(shí)多任務(wù)操作系統(tǒng)為目標(biāo)系統(tǒng)實(shí)現(xiàn)環(huán)境,提出基于rtos開發(fā)離子遷移譜毒品偵查儀所采用的分析和設(shè)計(jì)方法,構(gòu)思了一種基于數(shù)據(jù)流圖結(jié)構(gòu)模型的嵌入式軟件設(shè)計(jì)方法,提供一種設(shè)計(jì)中、小型實(shí)時(shí)系統(tǒng)的有效解決方案,并就系統(tǒng)實(shí)現(xiàn)中波峰位置(遷移時(shí)間)的查找以及溫度控制等設(shè)計(jì)了算法,總結(jié)了應(yīng)用rtos開發(fā)應(yīng)注意的問題。